def Quick_Sort(arr):
    if len(arr) <= 1:
        return arr
    else:
        mid = arr[len(arr) // 2]
        left = []
        middle = []
        right = []
        for x in arr:
            if x < mid:
                left.append(x)
            elif x == mid:
                middle.append(x)
            else:
                right.append(x)

    return Quick_Sort(left) + middle + Quick_Sort(right)


print(Quick_Sort([8, 6, 4, 2, 5, 1]))